package com.haiberg.framework.om;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * TUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="t_user", catalog="public")
public class TUser implements java.io.Serializable {

	// Fields

	private Integer id;
	private String password;
	private String name;
	private Integer age;
	private Date birthday;
	private Integer deptId;

	// Constructors

	/** default constructor */
	public TUser() {
	}

	/** full constructor */
	public TUser(String password, String name, Integer age, Date birthday,
			Integer deptId) {
		this.password = password;
		this.name = name;
		this.age = age;
		this.birthday = birthday;
		this.deptId = deptId;
	}

	// Property accessors
	/*@Id  
    @GeneratedValue(strategy=GenerationType.AUTO)  
    @Column(name = "id")  */
	
	@Id
	@SequenceGenerator(name="t_user_id_seq",sequenceName="t_user_id_seq")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name="password")
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name="name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name="age")
	public Integer getAge() {
		return this.age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}
	@Column(name="birthday")
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Column(name="dept_id")
	public Integer getDeptId() {
		return this.deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

}